package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.IOrderService;
import cn.wolfcode.trip.base.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单资源
 */
@RestController
@RequestMapping("orders")
public class OrderController {
    @Autowired
    private IOrderService orderService;
    @DeleteMapping("{id}")
    public JSONResult delete(@PathVariable Long id){
        orderService.delete(id);
        return new JSONResult();
    }
}
